package cn.fulong.sso.client.utils;


/**
 * @Version 1.0
 * @Author: 云树
 * @Description:
 * @Date: 2019/3/8
 * @Modify 云树
 * @ModifyDate 2019/3/8
 * @since 1.0
 */
public abstract class Assert {
    public static void notNull(Object object, String message) {
        if (object == null) {
            throw new IllegalArgumentException(message);
        }
    }

    public static void notNull(Object object) {
        notNull(object, "[sso.client failed] this argument is required; it must not be null");
    }

    public static void hasText(String text, String message) {
        if (StringSelfUtil.isBlank(text)) {
            throw new IllegalArgumentException(message);
        }
    }

    public static void hasText(String text) {
        hasText(text, "[sso.client failed] - this String argument must have text; it must not be null, empty, or blank");
    }
}
